const iconList = new Map();
//动态获取antDesign-icon组件
export const getIcon = (icon: string) => {
  if (!iconList.has(icon)) {
    const components = defineAsyncComponent(
      () => import(/* @vite-ignore */ `@ant-design/icons-vue/${icon}`)
    );
    iconList.set(icon, components);
    return components;
  } else {
    const components = iconList.get(icon);
    return components;
  }
};
